package com.inkFlow.book.domain.bo;

import com.inkFlow.book.domain.InkBookChapter;
import com.inkFlow.common.core.validate.AddGroup;
import com.inkFlow.common.core.validate.EditGroup;
import com.inkFlow.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 小说章节业务对象 ink_book_chapter
 *
 * @author Lion Li
 * @date 2025-08-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = InkBookChapter.class, reverseConvertGenerate = false)
public class InkBookChapterBo extends BaseEntity {

    /**
     * 小说章节id
     */
    private Integer chapterId;

    /**
     * 小说主键
     */
    @NotNull(message = "小说主键不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer bookId;

    /**
     * 爬虫小说章节id
     */
    @NotBlank(message = "爬虫小说章节id不能为空", groups = {AddGroup.class, EditGroup.class})
    private String crawlChapterId;

    /**
     * 章节名称
     */
    @NotBlank(message = "章节名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String chapterName;

    /**
     * 章节内容
     */
    @NotBlank(message = "章节内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String chapterContent;

    /**
     * 章节字数
     */
    @NotNull(message = "章节字数不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer wordCount;

    /**
     * 审核状态，1：待审核；2：审核驳回；3：审核通过；4：删除待审核；5：已删除
     */
    @NotNull(message = "审核状态，1：待审核；2：审核驳回；3：审核通过；4：删除待审核；5：已删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer applyStatus;

    /**
     * 是否收费，1：免费，2：收费
     */
    @NotNull(message = "是否收费，1：免费，2：收费不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer vipStatus;


}
